package com.ideaaedi.commonspring.aop;

import org.aopalliance.aop.Advice;
import org.springframework.aop.support.DefaultPointcutAdvisor;
import org.springframework.beans.factory.InitializingBean;

/**
 * (non-javadoc)
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img
 * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 1.0.0
 */
public class PointcutAdvisorWithInitial extends DefaultPointcutAdvisor implements InitializingBean {
    
    @Override
    public void afterPropertiesSet() throws Exception {
        Advice advice = getAdvice();
        if (advice instanceof InitializingBean initializingBean) {
            initializingBean.afterPropertiesSet();
        }
    }
}
